<!-- 缴费 -->
<div class="pay">
  <p class="caption">续租</p>
  <div class="table-operations">
    <button class="btn-normol" (click)="getReletApplyList()">全部</button>
    <button class="btn-normol" (click)="filterReletApplyList_state(1)">未通过</button>
    <button class="btn-normol" (click)="filterReletApplyList_state(2)">已通过</button>
    <button class="btn-normol" (click)="filterReletApplyList_isBackout(false)">未撤销</button>
    <button class="btn-normol" (click)="filterReletApplyList_isBackout(true)">已撤销</button>
    <button class="btn-normol" *ngIf="!IsApply" (click)="addReletApply()">续租</button>
  </div>
  <nz-table #filterTable
    nzTableLayout="fixed"
    class="pay-table"
    [nzBordered]="true"
    [nzFrontPagination]="true"
    [nzScroll]="{ y: '45rem' }"
  >
    <thead>
      <tr>
        <th>续租人</th>
        <th>社区</th>
        <th>审核状态</th>
        <th>撤销状态</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let data of reletListFilter">
        <td>{{data.CustomerName}}</td>
        <td [nzEllipsis]="true">
          <span nz-tooltip [nzTooltipTitle]="data.Community">{{data.Community}}</span>
        </td>
        <td>{{data.State===-1 ? '未审核' : data.State===1 ? '未通过' : '通过'}}</td>
        <td>{{data.IsBackout===true ? '撤销' : '未撤销'}}</td>
        <td>
          <button class="btn-normol btn-cancel" *ngIf="data.State===-1&&data.IsBackout===false" (click)="cancelApply(data.Id)">撤销</button>
          <span *ngIf="data.State!==-1||data.IsBackout===true">-</span>
        </td>
      </tr>
    </tbody>
  </nz-table>
  <nz-modal
   [(nzVisible)]="addModal"
   nzTitle="续租申请"
   (nzOnCancel)="handleCancelReletApply()"
   (nzOnOk)="handleOkRelet()">
    <ng-container *nzModalContent>
      <form nz-form>
        <nz-form-item>
          <nz-form-label nzSpan="4">申请理由</nz-form-label>
          <nz-form-control nzSpan="14">
            <nz-textarea-count [nzMaxCharacterCount]="100">
              <textarea rows="4" [(ngModel)]="applyReason" name="applyReason" required placeholder="请填写申请理由" nz-input></textarea>
            </nz-textarea-count>
          </nz-form-control>
        </nz-form-item>
      </form>
    </ng-container>
  </nz-modal>
</div>
